package com.dragon.repository.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dragon.repository.entity.ProductCategory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 商品类别表 Mapper 接口
 * </p>
 *
 * @author sy
 * @since 2023-09-11
 */
@Mapper
public interface ProductCategoryMapper extends BaseMapper<ProductCategory> {

    @Select("SELECT a.name AS categoryName FROM dragon_product_category a WHERE a.id = #{categoryId} ")
    String getCategoryName(Integer categoryId);
}
